package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(60)" json:"username"`
	Password string `gorm:"type:varchar(60)" json:"password"`
}

type Video struct {
	gorm.Model
	Title     string `gorm:"type:varchar(60)" json:"title"`
	Content   string `gorm:"type:varchar(60)" json:"content"`
	LikeCount int    `gorm:"type:int" json:"like_count"`
}

type Like struct {
	gorm.Model
	UserID  int   `gorm:"type:int" json:"user_id"`
	User    User  `gorm:"foreignKey:UserID" json:"user"`
	VideoID int   `gorm:"type:int" json:"video_id"`
	Video   Video `gorm:"foreignKey:VideoID" json:"video"`
}
